This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / web / src / routes / [handle] / [repo] / +layout@.svelte
1.1 kB 28 lines
1<script lang="ts"> 2 // the @ resets out of the profile shell, repo pages want their own header and 3 // tabs instead of the profile card 4 import { page } from "$app/state"; 5 import RepoHeader from "$lib/components/repo/RepoHeader.svelte"; 6 import RepoTabs from "$lib/components/repo/RepoTabs.svelte"; 7 8 let { children, data } = $props(); 9 10 const activeTab = $derived.by(() => { 11 const segment = page.route.id?.split("/")[3] ?? ""; 12 return ["issues", "pulls", "pipelines", "settings"].includes(segment) ? segment : "overview"; 13 }); 14</script> 15 16<!-- todo: og and twitter card tags, the appview has repo/fragments/og.html and meta.html --> 17<svelte:head> 18 <title>{data.repo.ownerHandle}/{data.repo.name} &middot; Tangled</title> 19 {#if data.repo.description} 20 <meta name="description" content={data.repo.description} /> 21 {/if} 22</svelte:head> 23 24<section class="mx-auto w-full max-w-screen-lg py-6"> 25 <RepoHeader repo={data.repo} counts={data.counts} viewerStarRkey={data.viewerStarRkey} /> 26 <RepoTabs repo={data.repo} counts={data.counts} active={activeTab} /> 27 {@render children()} 28</section>